home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4810 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: ilnews.iil.intel.com!pauls
  2. From: Michael Tiomkin <mtiomkin@iil.intel.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can main() function be called?
  5. Date: 6 Feb 1996 13:52:25 GMT
  6. Organization: Intel Israel
  7. Message-ID: <4f7mep$22nt@ilx018.iil.intel.com>
  8. References: <4f3hgv$ml8@columba.udac.uu.se>
  9. NNTP-Posting-Host: ilnt169.iil.intel.com
  10. Mime-Version: 1.0
  11. Content-Type: multipart/mixed;
  12.     boundary="-------------------------------208592502514484"
  13. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  14.  
  15. This is a multi-part message in MIME format.
  16.  
  17. ---------------------------------208592502514484
  18. Content-Transfer-Encoding: 7bit
  19. Content-Type: text/plain; charset=us-ascii
  20.  
  21. You shouldn't have any problem to call main() recursively.
  22. What usually happens is that the C initializer code calls
  23. main with the corresponding parameters (nargs, args, and 
  24. env?). If you write your main knowing that it will be called
  25. recursively, this is doable. Of course, another question is
  26. WHY should you do this: usually, people use the main to 
  27. analyze the parameters and distribute the work between other 
  28. functions.
  29.  
  30.   Michael Tiomkin
  31.  
  32. ---------------------------------208592502514484
  33. Content-Transfer-Encoding: 7bit
  34. Content-Type: text/plain
  35.  
  36. From: m92fra@sabik.tdb.uu.se (Fredrik Raadesand)
  37. Newsgroups: comp.lang.c
  38. Subject: Re: Can main() function be called?
  39. Date: 5 Feb 1996 00:03:43 GMT
  40. Organization: department of Scientific Computing, Uppsala University, Sweden
  41. Message-ID: <4f3hgv$ml8@columba.udac.uu.se>
  42.  
  43. > I think that it cannot be done, I see no reasonalbe way how main()
  44. > could be called more than once.
  45. >
  46. >
  47. >  What is your thoughts on this?
  48. >
  49.  
  50. I would say the simplest way to find out is to try it out ?
  51. ..to post the question on the net is probably more difficult. ;)
  52.  
  53. Either it works or it doesn't, right ?
  54.  
  55.  /Fredrik
  56.  
  57. ---------------------------------208592502514484--
  58.